package syb.wind.speed.direction.plugin.model;

import com.zhny.aiot.plugin.ActionValue;
import com.zhny.aiot.plugin.PropertyValue;
import com.zhny.aiot.plugin.model.*;
import lombok.Data;

@Data
public class SpeedDirectionStoreEntry extends StoreEntity {
    @PropertyValue(alias = "风速",description = "风速",unit = "m/s",icon=IconConstract.Speed,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String speed;

    @PropertyValue(alias = "风级",description = "风级",unit = "",icon=IconConstract.Speed,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String windLevel;
    @PropertyValue(alias = "风向角度",description = "风向角度",unit = "°",icon=IconConstract.Direction,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String directionAngle;

    @PropertyValue(alias = "风向",description = "风向",unit = "°",icon=IconConstract.Direction,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String direction;

    @Override
    public String toString(){
        StringBuilder builder = new StringBuilder ();
        builder.append ("speed:");builder.append (speed);builder.append (";");
        builder.append ("windLevel:");builder.append (windLevel);builder.append (";");
        builder.append ("directionAngle:");builder.append (directionAngle);builder.append (";");
        builder.append ("direction:");builder.append (direction);builder.append (";");
        return builder.toString ();
    }
}
